package com.example.comtroller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Administrator on 2016/9/26/026.
 */
//@ControllerAdvice
public class TestControllerA {
    @ExceptionHandler
    public ModelAndView testHandlerException(Exception ex){
        ModelAndView mv=new ModelAndView("error");
        mv.addObject("exception",ex);
        return mv;
    }
}
